# Maintainer: Balló György <ballogyor+arch at gmail dot com>
# Contributor: Nevar <psi.neamf@gmail.com>

pkgname=nautilus-share
pkgver=0.7.5
pkgrel=3
pkgdesc='Nautilus extension to share folder using Samba'
arch=('loong64' 'x86_64')
url="https://git.gnome.org/browse/nautilus-share"
license=('GPL')
depends=('nautilus' 'samba')
makedepends=('intltool' 'meson')
source=("https://gitlab.gnome.org/coreyberla/nautilus-share/-/archive/$pkgver/nautilus-share-$pkgver.tar.gz"
         https://gitlab.gnome.org/coreyberla/nautilus-share/-/commit/abf29e42.patch)
sha512sums=('5a251595bfd2e4375f4dd91f5ee7f5b29681435bd2f268861e5fcc5cd6b1f0b9ced98cb269439b7a90329af071f0b91d2c767c408d3c1fd27fa9322693d150d8'
            'e2538267ddce9a438d0bc2dce975f8a353885ac1b60cdfdf9844911b1dbf55c0466694b6fd5d26c03dde59c918ae0f1a903dba8ee2432ca9bd1c108d33bd80bc')

prepare() {
  patch -d $pkgname-$pkgver -p1 < abf29e42.patch # Fix missing translations
}

build() {
  meson build $pkgname-$pkgver \
    --prefix=/usr \
    --datadir=share/nautilus-share
  meson compile -C build
}

package() {
  meson install -C build --destdir="$pkgdir"
}
